<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
	<meta charset="utf-8">
	<title></title>
	<link rel="stylesheet" th:href="@{/bootstrap-4.6.0-dist/css/bootstrap.min.css}">
	<link rel="stylesheet" th:href="@{/bootstrap-4.6.0-dist/css/bootstrap-icons.css}">
	<script th:src="@{/js/jquery.min.1.10.2.js}"></script>
	<style type="text/css">
		.content{
			margin: 15px;
		}
	</style>
</head>


<body>
	<div class="content">
		<form method="post" id="addForm">
			<div class="form-group row" style="display: none">
			    <label  class="col-sm-1 col-form-label">编号</label>
			    <input type="text" class="form-control col-sm-7" name="id">
			</div>
			<div class="form-group row">
			     <label class="col-sm-1 col-form-label">学院名称</label>
			    <input  type="text" class="form-control col-sm-7" name="name">
			</div>
			<div class="form-group row">
			     <label class="col-sm-1 col-form-label">学院简介</label>
			    <input type="text" class="form-control col-sm-7" name="description">
			</div> 
			<button type="button" class="btn btn-primary" id="submitBtn">提交</button>
		</form>
			
	</div>
</body>
<script>
$("#submitBtn").click(function (){
	var obj = $("#addForm").serialize();
	$.ajax({
		type: "POST",
		url: "/addAcademy",
		data: obj,
		success: function(msg){
			alert(msg);
			window.location.href= "/list";
		}
	});
})
</script>
</html>
